/*
package com.atguigu.custmersystem.service;

import com.atguigu.custmersystem.javabean.Customer;

*/
/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/11/11 10:42
 * @注释 测试类
 *//*

public class CustomerServiceTest {
    public static void main(String[] args) {
        CustomerService service = new CustomerService(10);

        Customer c1 = new Customer("张三",'男',19,"15588546542","zhangsan@guigu.com");
        Customer c2 = new Customer("李四",'男',19,"15588546542","zhangsan@guigu.com");
        Customer c3 = new Customer("王五",'男',19,"15588546542","zhangsan@guigu.com");
        Customer c4 = new Customer("六六",'男',19,"15588546542","zhangsan@guigu.com");
        System.out.println("------------------添加-------------------");
        service.addCustomer(c1);
        service.addCustomer(c2);
        service.addCustomer(c3);
        boolean isAdd = service.addCustomer(c4);
        System.out.println("isAdd = " + isAdd);
        System.out.println("--------------------------客户列表----------------------------");
        System.out.println("编号\t姓名\t性别\t年龄\t电话\t\t\t邮箱");
        Customer[] customer = service.getAllCustomers();
        for (int i = 0; i < customer.length; i++) {
            System.out.println((i+1)+ "\t" + customer[i]);
        }
        System.out.println("---------------------删除客户信息-----------------------");
        boolean isDelete = service.deleteCustomer(1);
        System.out.println("isDelete = " + isDelete);

        System.out.println("----------------查询客户信息-----------------");
        Customer isGet = service.getCustomer(1);
        System.out.println("isGet = " + isGet);

        System.out.println("-------------------修改客户信息-------------------");
        Customer cust = new Customer("孙七",'男',20,"1122334556","zq@guigu.com");
        boolean isReplace = service.replaceCustomer(0, cust);
        System.out.println("isReplace = " + isReplace);

        System.out.println("编号\t姓名\t性别\t年龄\t电话\t\t\t邮箱");
        Customer[] customer1 = service.getAllCustomers();
        for (int i = 0; i < customer1.length; i++) {
            System.out.println((i+1)+ "\t" + customer1[i]);
        }
    }
}
*/
